package com.daidai.dao.impl;

import com.daidai.dao.UserDao;
import com.daidai.domain.User;
import com.daidai.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserDaoImpl implements UserDao {

    @Autowired
    private UserMapper userMapper;

    @Override
    public User findAllUserById(int id) {
        return userMapper.findAllUsersById(id);
    }

    @Override
    public void insert(User user) {
        userMapper.insert(user);
    }

    @Override
    public void delete(int id) {
        userMapper.delete(id);
    }
}
